home *** CD-ROM | disk | FTP | other *** search
- Path: ssbunews.ih.att.com!news
- From: Mark Slater <mslater@mltsa.mlm.att.com>
- Newsgroups: comp.lang.c++
- Subject: Re: Q: default copy constructor
- Date: Wed, 13 Mar 1996 08:43:33 +0000
- Organization: AT&T
- Message-ID: <31468AB5.41C67EA6@mltsa.mlm.att.com>
- References: <4i49tj$991@azure.acsu.buffalo.edu>
- NNTP-Posting-Host: rumpole.mlm.att.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (X11; I; SunOS 4.1.3_U1 sun4c)
-
- Li Chen wrote:
- >
- > Hi, everyone:
- >
- > Ihave a question:does a C++ compiler generate copy constructor
- > if there is none in the program?
- >
- > Thank you.
- >
- > David
- >
- > --
- > ___________________________________________________________________________
- > ---------------------------------------------------------------------------
- >
- > David Li Chen
-
- Yes, but this will only be a shallow copy which can cause you memory
- problem later. It's best always to define your own.
-